package cn.example.vip.mall.goods.mapper;

import cn.example.vip.mall.goods.entity.SkuAttribute;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SkuAttributeMapper extends BaseMapper<SkuAttribute> {
	
	/**
	 * 根据查询品牌的属性集合
	 * @param categoryId
	 * @return
	 */
	@Select("SELECT * FROM sku_attribute WHERE id in (SELECT attr_id FROM category_attr WHERE id = #{categoryId})")
	List<SkuAttribute> queryByCategoryId(Integer categoryId);

}
